/**
 * Copyright (C) 2015-2018 IQIYI
 * All rights reserved.
 *
 * Author     : 王海斌
 * E-mail     : wanghaibin@qiyi.com
 * Version    :
 * Date       : Fri 08 May 2020 12:50:42 PM CST
 * Destription: 测试
 */

#include <gtest/gtest.h>

#include "configure.h"

TEST(ConfigureTest, addItem)
{
    // do some initialization
    Configure* pc = new Configure();

    // validate the pointer is not null
    ASSERT_TRUE(pc != NULL);

    // call the method we want to test
    pc->addItem("A");
    pc->addItem("B");
    pc->addItem("A");

    // validate the result after operation
    EXPECT_EQ(pc->getSize(), 2);
    EXPECT_STREQ(pc->getItem(0).c_str(), "A");
    EXPECT_STREQ(pc->getItem(1).c_str(), "B");
    EXPECT_STREQ(pc->getItem(10).c_str(), "");

    delete pc;
}
